package com.example.journalegocentrique;

import java.io.File;

import android.annotation.SuppressLint;
import android.database.sqlite.SQLiteDatabase;

//Helper class to access database

public class GetDataBase {
	
	
	@SuppressLint("SdCardPath")
	public static SQLiteDatabase getDb()
	{
		final String DB_PATH = "/data/data/com.example.journalegocentrique/databases/";
		final String DB_NAME = "jedb.db";
	    SQLiteDatabase database=null;
		try
	    {
	    		
	    		File dbFile = new File(DB_PATH + DB_NAME);
	    		database = SQLiteDatabase.openOrCreateDatabase(dbFile, null);    
	    		return database;
	    }
	    catch(Exception e)
	    {
	    	return null;
	    }
	}
	
	

}
